<template>
    <view class="cus-page">
        <!-- 顶部安全距离 -->
        <u-gap height="90rpx" bgColor="transparent"></u-gap>

        <!-- Tab -->
        <view class="ct-scroll-x">
            <ct-scroll-x keys="title" :tab="tab" :current="current" @cutTab="e=>current=e.i" />
        </view>

        <!-- 列表 -->
        <view class="type-area">
            <view class="com-m-t-20" v-for="(item,index) in list" :key="index">
                <ct-business-list :cardData="item" @clickButton="clickButton" />
            </view>
        </view>

        <!-- 底部安全距离 -->
        <u-gap height="30rpx" bgColor="transparent"></u-gap>
    </view>
</template>


<script>
export default {
    name:'orderList', // 我的订单
    props:{},
    components: {},
    data () {
        return {
            tab: [
                { title: "全部", status: 0 },
                { title: "待付款", status: 1 },
                { title: "已入库", status: 2 },
                { title: "委托寄售", status: 3 },
                { title: "直邮/拼团", status: 4 }, 
                { title: "已发货", status: 5 },
            ],
            current: 0,
            list: [
                { 
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 1, 
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '新品',
                            price: 1660,
                            num: 1
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 2,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '新品',
                            price: 160,
                            num: 1
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 3,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '二手',
                            price: 1660,
                            num: 23
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 41,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '二手',
                            price: 1660,
                            num: 23
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 5,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '二手',
                            price: 1660,
                            num: 23
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 42,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '二手',
                            price: 1660,
                            num: 23
                        }
                    ]
                },
                {
                    logo: '/static/logo.ico',
                    name: 'rakuma卖家：泡泡玛特',
                    status: 43,
                    list: [
                        { 
                            imgUrl: '/static/temporary/img2.jpg',
                            title: '宝可梦集换式卡牌游戏PTCGA 简中日月第一弹测试测试',
                            tag: '二手',
                            price: 1660,
                            num: 23
                        }
                    ]
                },
            ]
        }
    },
    computed: {},
    watch: {},

    onLoad(option){
        this.current = option.status
        this.list.map((v,i)=>{
            v.status = option.status
        })
    },
    mounted() {},

    methods: {
        // 按钮点击事件
        clickButton(e){
            console.log(e);
        }
    },
}
</script>


<style scoped lang='scss'>
    .ct-scroll-x{
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
    }
    .card{
        background: #fff;
        padding: 24rpx 32rpx;
        border-radius: 24rpx;
    }
</style>